package com.qf.domain;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
//评价列表
public class NewsComment {
    private Integer id;
    @NotNull(message = "对应主键sid不能为空")
    private Integer newsid;
    @NotBlank(message = "评价内容不能为空")
    private String content;//内容
    private String author;//评价人
//    @NotNull(message = "评价时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdate;

    public NewsComment() {
    }

    public NewsComment(Integer id, Integer newsid, String content, String author, Date createdate) {
        this.id = id;
        this.newsid = newsid;
        this.content = content;
        this.author = author;
        this.createdate = createdate;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNewsid() {
        return newsid;
    }

    public void setNewsid(Integer newsid) {
        this.newsid = newsid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    @Override
    public String toString() {
        return "NewsComment{" +
                "id=" + id +
                ", newsid=" + newsid +
                ", content='" + content + '\'' +
                ", author='" + author + '\'' +
                ", createdate=" + createdate +
                '}';
    }
}
